package tothreedesignmodel.state;

import lombok.Data;

/**
 * @Author lzhphantom
 * @Description
 * @Date 创建于 18:19 2020/7/16
 * @Modified
 */
@Data
public class Context {
    private State state;

    public Context() {
        this.state = new StartState();
    }
    public void handle(){
        state.doAction(this);
    }

    public static void main(String[] args) {
        Context context = new Context();
        context.handle();
        context.handle();
        context.handle();
        context.handle();
    }
}
